#ifndef PACMAN_H
#define PACMAN_H

#include "../WinDraw/Animation.h"	

#include "Character.h"
#include "InputController.h"
#include "Wandering.h"


class PacMan :
	public Character
{
private:
	Bitmap* mPmAnimImg; 
	Animation* mPmAnim; 
	int mLoopAnim;
	int NUM_LOOP_ANIM;


	const bool mExternMBehavior;
	Bitmap* mImages[PROXIMITY_COUNT];
	Proximity_dir mFacing;

	int mScore;
	int mLives;

	void CreateAnimation(); //creates an animation. 
	void DestroyAnimation();

public:
	PacMan(void);
	PacMan(InputController* inputCtrl);
	~PacMan(void);

	const int  getScore() const { return mScore; }
	const int  getLives() const { return mLives; }

	void move(Background* bg);
	void moveTo(const Background* bg, BackgroundElement* nTile);
	
	void setupProximity(const Background* bg, BackgroundElement* tile);
	//void attach(InputController* inputCtrl);
	//void detach();

	void collisionWith(GameEntity* entity, bool specialActive = false);
	void deactivate();
	void activate();


	void DrawTo(Bitmap* renderTarget, const bool specialActive, const int x = 0, const int y = 0);
	void DrawTo(Bitmap* renderTarget, const int x = 0, const int y = 0);
};

#endif //PACMAN_H
